<html>
<head>
	<title>Icon maker</title>
</head>
<link rel="stylesheet" href="../static/bootstrap.min.css">
<link rel="stylesheet" href="../static/bootstrap-theme.min.css">
<style type="text/css">
#logoDiv{
	padding-top			: 20px;
	padding-bottom		: 0px;
	background-color	: rgb(157, 196, 255);
}
#contentDiv{
	padding-left		: 20%;
	padding-top			: 20px; 	
}
body{
	margin-right		: 0px; 
	margin-left			: 0px; 
	margin-top			: 0px; 
	margin-bottom		: 0px;
}
.speca{
    border: solid #AAAAAA 1px;
}
.likeButton:hover{
	font-weight: bold;
}
.block_container{
    text-align:center;
}
.blocmainLogo{
    display:inline;
}
.blocmainInfo{
    display:inline;
}
.blocmainInfo:hover{
    font-weight: bold;
}

.form-signin{max-width: 330px;padding: 15px;margin: 0 auto;}
.form-signin .form-signin-heading, .form-signin .checkbox{margin-bottom: 10px;}
.form-signin .checkbox{font-weight: normal;}
.form-signin .form-control{position: relative;font-size: 16px;height: auto;padding: 10px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
.form-signin .form-control:focus{z-index: 2;}
.form-signin input[type="text"]{margin-bottom: -1px;border-bottom-left-radius: 0;border-bottom-right-radius: 0;}
.form-signin input[type="password"]{margin-bottom: 10px;border-top-left-radius: 0;border-top-right-radius: 0;}
.account-wall{margin-top: 20px;padding: 40px 0px 20px 0px;background-color: #f7f7f7;-moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);-webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);}
</style>
<script type="text/javascript">

var _validFileExtensions = [".jpg", ".jpeg", ".bmp", ".gif", ".png"];
function Validate(oForm) {
    var arrInputs = oForm.getElementsByTagName("input");
    for (var i = 0; i < arrInputs.length; i++) {
        var oInput = arrInputs[i];
        if (oInput.type == "file") {
            var sFileName = oInput.value;
            if (sFileName.length > 0) {
                var blnValid = false;
                for (var j = 0; j < _validFileExtensions.length; j++) {
                    var sCurExtension = _validFileExtensions[j];
                    if (sFileName.substr(sFileName.length - sCurExtension.length, sCurExtension.length).toLowerCase() == sCurExtension.toLowerCase()) {
                        blnValid = true;
                        break;
                    }
                }

                if (!blnValid) {
                    alert("Sorry, " + sFileName + " is invalid, allowed extensions are: " + _validFileExtensions.join(", "));
                    return false;
                }
            }
        }
    }

    return true;
}

function bodyAppend(tagName, innerHTML) {
    var elm;

    elm = document.createElement(tagName);
    elm.innerHTML = innerHTML;
    document.body.appendChild(elm);
}
</script>
<body>
	<div align="center" id="logoDiv">
        <div class="block_container">
            <div class="blocmainLogo">
    		  <img src="../static/mainLogo.png" style="padding-bottom : 40px;">
            </div>
            <div    class="blocmainInfo"
                    onclick="window.location.href='../logout'">Выход</div>
        </div>
		<table width="100%">
			<colgroup>
		       <col span="1" style="width: 50%;">
		       <col span="1" style="width: 50%;">
		    </colgroup>
			<tr>
				<td align="right" 
                    class="likeButton" 
                    style="padding-right:10px;"
                    onclick="window.location.href='..'">База иконок</td>
				<td align="left" 
                    class="likeButton" 
                    style="padding-left:10px;" 
                    onclick="window.location.href='../loadImage'">Загрузка иконок</td>
			</tr>
		</table>
	</div>
    {% if pageType == "uploadIcon" %}
        {% include 'uploadIcon.html' %}
    {% endif %}
    {% if pageType == "startPage" %}
        {% include 'startPage.html' %}
    {% endif %}
    {% if pageType == "loginPage" %}
        {% include 'loginPage.html' %}
    {% endif %}
    {% if pageType == "viewer" %}
        {% include 'viewerIcon.html' %}
    {% endif %}
</body>
</html>